package p.ithorns.framework.schedule;

import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
import java.util.concurrent.TimeUnit;

/**
 * CronScheduled
 * <p>
 * 调度任务标注
 *
 * @author ithorns
 * @version 1.0
 * @date 2020/10/21 21:29
 */
@Target({ElementType.TYPE, ElementType.METHOD})
@Retention(RetentionPolicy.RUNTIME)
@Scheduled
public @interface PeriodScheduled {

    long period();

    TimeUnit timeUnit() default TimeUnit.MILLISECONDS;

    long initialDelay() default 0L;

    boolean fixedRate() default false;

    String desc() default "";

    boolean started() default false;
}
